#!/bin/sh
set -x

if [ -z "$ECLIPSE_HOME" ]; then
	echo "ECLIPSE_HOME not set" 1>&2
	exit 1
fi

if [ ! -x "$ECLIPSE_HOME/eclipse" ]; then
	echo "'$ECLIPSE_HOME/eclipse' not executable" 1>&2
	exit 1
fi

export JAVA_HOME=${ECLIPSE_JAVA_HOME}
ECLIPSE_VM=$JAVA_HOME/bin/java

if [ ! -x $ECLIPSE_VM ]; then
	echo "'$ECLIPSE_VM' not executable" 1>&2
	exit 1
fi

: $ECLIPSE_LOG 
$ECLIPSE_HOME/eclipse -vm $ECLIPSE_VM -data $DEV_DIR -vmargs -Duser.name="$IDE_AUTHOR" -Xmx1g -XX:MaxPermSize=384m >$ECLIPSE_LOG 2>&1 &

